using UnityEngine;
using UnityEngine.UI;

namespace BToolkit
{
    public class LuckyWheelDemo : MonoBehaviour
    {
        public LuckyWheelDriver turntable;
        public CButton btnStart;
        public Text text;

        private void Awake()
        {
            for (int i = 0; i < turntable.transform.childCount; i++)
            {
                turntable.transform.GetChild(i).GetComponent<Text>().text = i.ToString();
            }

            text.text = turntable.freeRotate ? "待机时可以自由旋转" : "待机时不可以自由旋转";

            btnStart.AddClick(() =>
            {
                turntable.StartRun(90, () =>
                {

                });
            });
        }
    }
}